package com.yonyou.cyxdms.sysAuth.service.mapper;

import com.yonyou.cyx.framework.dao.base.SuperMapper;
import com.yonyou.cyxdms.sysAuth.service.dto.AreaManagerDto;
import com.yonyou.cyxdms.sysAuth.service.dto.UserDTO;
import com.yonyou.cyxdms.sysAuth.service.entity.EmpPo;
import com.yonyou.cyxdms.sysAuth.service.entity.UserOrgPositionPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 鐢ㄦ埛涓庤亴浣嶅叧绯昏〃 Mapper 接口
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
public interface UserOrgPositionMapper extends SuperMapper<UserOrgPositionPO> {

    Map queryRoleIds(@Param("userId") Integer userId);

    //通过userid获取tm_user_org_position.ORG_POSITION_ID
    List<Map> getPositionidWithUserId(@Param("userId") Integer userId);

    void deleteByuserId(@Param("userId") Integer userId);

    /**
     * 获取区域经理
     * @param orgId
     * @return
     */
    List<EmpPo> queryAreaManagerByOrgId(@Param("orgId") Long orgId);

    /**
     * 获取全部区域经理
     * @return
     */
    List<AreaManagerDto> queryAreaManagerAll();
}
